package exception;

import java.text.ParseException;

public class test1 {
    public static void main(String[] args) {
        try{
            getOne(160);

        }catch (runtimeThroeException e){
            System.out.println(e);
        }
    }
    public static void getOne(int a ){
        if(a>=0&& a<=150){
            System.out.println("没问题");
        }else{
        throw   new  runtimeThroeException("错误信息"); // throw 会抛出问题, 到调用者位置
//            System.out.println();
        }
    }
}
